<?php
// Get a file into an array.  In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines = file('/var/www/ac/acserver.log');

echo "<pre>";
// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {





	if(strlen($line)<6)
                continue;


	if(strcmp(substr($line,0,1),"<")==0)
                continue;


        if(strcmp(substr($line,0,4),"read")==0)
                continue;




	if(strcmp(substr($line,0,6),"Status")==0)
                continue;

        if(strcmp(substr($line,0,6),"Ctrl-C")==0)
                continue;


        if(strcmp(substr($line,0,7),"looking")==0)
                continue;

        if(strcmp(substr($line,0,7),"sending")==0)
                continue;


        if(strcmp(substr($line,0,7),"logging")==0)
                continue;

        if(strcmp(substr($line,0,9),"dedicated")==0)
                continue;

        if(strcmp(substr($line,0,12),"masterserver")==0)
                continue;


        if(strcmp(substr($line,0,23),"Registration successful")==0)
                continue;








//        if(strcmp(substr($line,0,23),"")==0)
 //               continue;




        if(strcmp(substr($line,0,11),"Game start:")==0){
		echo "\n\nLine #{$line_num} : " . htmlspecialchars($line) ;
	}else{
    		echo "Line #{$line_num} : " . htmlspecialchars($line) ;
	}
}

echo "</pre>";
// Another example, let's get a web page into a string.  See also file_get_contents().
//$html = implode('', file('http://www.example.com/'));

// Using the optional flags parameter since PHP 5
//$trimmed = file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
?>
